/**
 * Writed by yura and mak
 */

package wz.legend.util;

import org.apache.commons.digester.AbstractObjectCreationFactory;
import org.xml.sax.Attributes;

public class IntegerCreationFactory extends AbstractObjectCreationFactory {
    private String atributeName;

    public IntegerCreationFactory(String atributeName) {
        this.atributeName = atributeName;
    }

    public Object createObject(Attributes attributes) throws Exception {
        String value = attributes.getValue(atributeName);
        return new Integer(value);
    }

}
